package com.chuyangc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chuyangc.entity.Sellers;
import com.chuyangc.mapper.GoodsMapper;
import com.chuyangc.service.SellersService;
import com.chuyangc.mapper.SellersMapper;
import com.chuyangc.vo.GoodsAndSellers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 欧楚杨
* @description 针对表【sellers】的数据库操作Service实现
* @createDate 2022-05-04 19:42:02
*/
@Service
public class SellersServiceImpl extends ServiceImpl<SellersMapper, Sellers>
    implements SellersService{
    @Autowired
    SellersMapper sellersMapper;

    @Autowired
    GoodsMapper goodsMapper;

    @Override
    public boolean updateSellersBySid(Sellers sellers) {
        int i = sellersMapper.updateSnameBySid(sellers.getSname(), sellers.getSid());
        if(i == 1){
            return true;
        }else {
            return false;
        }
    }

    @Override
    public List<GoodsAndSellers> listGS() {
        return sellersMapper.listGS();
    }
}




